package br.ufpe.cin.analysis.plugin.entities;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement(namespace = "br.ufpe.cin.analysis.plugin.entities")
@XmlType(propOrder = { "processName", "activityList"} )
public class Process {
	
	@XmlElement(name = "processName")
	private String processName;
	
	@XmlElementWrapper(name = "activityList")
	@XmlElement(name = "activity")
	private ArrayList<Activity> activityList;
	
	
	
	public Process(ArrayList<Activity> activityList, String name)
	{
		this.activityList = activityList;
		this.processName = name;
	}
	
	public Process(String name)
	{
		this(new ArrayList<Activity>(),name);
	}
	
	public Process()
	{
		this(null,null);
	}
	
	@XmlTransient
	public ArrayList<Activity> getActivities() {
		return this.activityList;
	}
	
	
	public void setActivities(ArrayList<Activity> activityList) {
		this.activityList = activityList;
	}
	
	@XmlTransient
	public String getName() {
		return this.processName;
	}

	public void setName(String name) {
		this.processName = name;
	}
	
	

}
